<extend name="Common/common"/>
<block name="main">
	<div class="aui-content">
		<div class="aui-list-item-inner me-wrap-accept">
			<div class="aui-list-item-right me-accept-info">
			   <span>接受新消息通知</span><input type="checkbox" id="myinput" class="aui-switch" <eq name="is_allow" value="0">checked</eq>>
			</div>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		$(function(){
			//修改状态
			$('#myinput').change(function(){
				//得到当前值
				var value = $(this).attr('checked');
				if(value=='checked'){
					value = 0;
				}else{
					value = 1;
				}
				//提交信息
				$.post(location.href,{value:value},function(data){
					if(data.code==0){

					}else{
						layer_msg(data.msg);
					}
				},'json');

			});
		});
	</script>
</block>